import { h } from '../../lib/guide-mini-vue.esm.js'
import { Foo } from './Foo.js'

window.self = null
export const App = {
    name: 'APP',
    render() {
        window.self = this
        return h(
            "div",
            {
                id: "root",
                class: ["res", "hard"],
            },
            [
                h("div", {
                    onClick() {
                        console.log('click')
                    }
                }, "hi," + this.msg),
                h(Foo, {
                    count: 1,
                    onAdd(a, b) {
                        console.log('onAdd', a, b);
                    },
                    onAddFoo(a, b) {
                        console.log('onAddFoo', a, b);
                    }
                })
            ],
            // "hi, mini-vue"
            // [h("p", { class: "red" }, "hi"), h("p", { class: "blue" }, this.msg)]
        )
    },
    setup() {

        return {
            msg: "mini-vue"
        }
    }
}